<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v2.7.2" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />

<title><?php echo $this->_var['page_title']; ?></title>

<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />

<?php echo $this->smarty_insert_scripts(array('files'=>'utils.js,common.js,global.js,compare.js')); ?>
</head>
<body>
<?php echo $this->fetch('library/page_header.lbi'); ?>
<?php echo $this->fetch('library/search_form.lbi'); ?>
<?php echo $this->fetch('library/ur_here.lbi'); ?>
<div class="block clearfix">

  <div id="areaLeft">
	  <div id="goodsLtop">
		 <div class="cartBox">
		  <?php echo $this->fetch('library/cart.lbi'); ?>
		 </div>	
			<div class="Gaction clearfix">
		  <a href="user.php"><?php echo $this->_var['lang']['label_login']; ?></a><a href="user.php?act=register"><?php echo $this->_var['lang']['label_regist']; ?></a>
			<a href="user.php?act=profile"><?php echo $this->_var['lang']['label_profile']; ?></a><a href="user.php?act=collection_list"><?php echo $this->_var['lang']['label_collection']; ?></a>
		 </div>
		</div>
	
	<?php echo $this->fetch('library/category_tree.lbi'); ?>
	<?php echo $this->fetch('library/promotion_info.lbi'); ?>
	<?php echo $this->fetch('library/history.lbi'); ?>
	<?php echo $this->fetch('library/goods_article.lbi'); ?>
	<?php echo $this->fetch('library/goods_attrlinked.lbi'); ?>
  <?php echo $this->fetch('library/price_grade.lbi'); ?>
  
	</div>


  <div id="areaRight">
	  
    
		<?php if ($this->_var['action'] == "form"): ?>
    
		<div class="General_Title clearfix">
     <div class="TitleBoxcon"><p><?php echo $this->_var['lang']['advanced_search']; ?></p>&nbsp;</div>
		</div>
		<div class="clearfix groupList">
		<form action="search.php" method="get" name="advancedSearchForm" id="advancedSearchForm">
    <table border="0" align="center" cellpadding="3">
      <tr>
        <td valign="top"><?php echo $this->_var['lang']['keywords']; ?>：</td>
        <td>
          <input name="keywords" id="keywords" type="text" size="40" maxlength="120" class="border" value="<?php echo $this->_var['adv_val']['keywords']; ?>" />
          <label for="sc_ds"><input type="checkbox" name="sc_ds" value="1" id="sc_ds" <?php echo $this->_var['scck']; ?> /><?php echo $this->_var['lang']['sc_ds']; ?></label>
          <br /><?php echo $this->_var['lang']['searchkeywords_notice']; ?>
        </td>
      </tr>
      <tr>
        <td><?php echo $this->_var['lang']['category']; ?>：</td>
        <td><select name="category" id="select" class="border">
            <option value="0"><?php echo $this->_var['lang']['all_category']; ?></option><?php echo $this->_var['cat_list']; ?></select>
        </td>
      </tr>
      <tr>
        <td><?php echo $this->_var['lang']['brand']; ?>：</td>
        <td><select name="brand" id="brand" class="border">
            <option value="0"><?php echo $this->_var['lang']['all_brand']; ?></option>
            <?php echo $this->html_options(array('options'=>$this->_var['brand_list'],'selected'=>$this->_var['adv_val']['brand'])); ?>
          </select>
        </td>
      </tr>
      <tr>
        <td><?php echo $this->_var['lang']['price']; ?>：</td>
        <td><input name="min_price" type="text" id="min_price" class="border" value="<?php echo $this->_var['adv_val']['min_price']; ?>" size="10" maxlength="8" />
          -
          <input name="max_price" type="text" id="max_price" class="border" value="<?php echo $this->_var['adv_val']['max_price']; ?>" size="10" maxlength="8" />
        </td>
      </tr>
      <?php if ($this->_var['goods_type_list']): ?>
      <tr>
        <td><?php echo $this->_var['lang']['extension']; ?>：</td>
        <td><select name="goods_type" onchange="this.form.submit()" class="border">
            <option value="0"><?php echo $this->_var['lang']['all_option']; ?></option>
            <?php echo $this->html_options(array('options'=>$this->_var['goods_type_list'],'selected'=>$this->_var['goods_type_selected'])); ?>
          </select>
        </td>
      </tr>
      <?php endif; ?>
      <?php if ($this->_var['goods_type_selected'] > 0): ?>
      <?php $_from = $this->_var['goods_attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['item']):
?>
      <?php if ($this->_var['item']['type'] == 1): ?>
      <tr>
        <td><?php echo $this->_var['item']['attr']; ?>：</td>
        <td colspan="3"><input name="attr[<?php echo $this->_var['item']['id']; ?>]" value="<?php echo $this->_var['item']['value']; ?>" class="border" type="text" size="20" maxlength="120" /></td>
      </tr>
      <?php endif; ?>
      <?php if ($this->_var['item']['type'] == 2): ?>
      <tr>
        <td><?php echo $this->_var['item']['attr']; ?>：</td>
        <td colspan="3"><input name="attr[<?php echo $this->_var['item']['id']; ?>][from]" class="border" value="<?php echo $this->_var['item']['value']['from']; ?>" type="text" size="5" maxlength="5" />
          -
          <input name="attr[<?php echo $this->_var['item']['id']; ?>][to]" value="<?php echo $this->_var['item']['value']['to']; ?>"  class="border" type="text" maxlength="5" /></td>
      </tr>
      <?php endif; ?>
      <?php if ($this->_var['item']['type'] == 3): ?>
      <tr>
        <td><?php echo $this->_var['item']['attr']; ?>：</td>
        <td colspan="3"><select name="attr[<?php echo $this->_var['item']['id']; ?>]" class="border">
            <option value="0"><?php echo $this->_var['lang']['all_option']; ?></option>
            <?php echo $this->html_options(array('options'=>$this->_var['item']['options'],'selected'=>$this->_var['item']['value'])); ?>
          </select></td>
      </tr>
      <?php endif; ?>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
      <?php endif; ?>

      <?php if ($this->_var['use_storage'] == 1): ?>
      <tr>
        <td>&nbsp;</td>
        <td><label for="outstock"><input type="checkbox" name="outstock" value="1" id="outstock" <?php if ($this->_var['outstock']): ?>checked="checked"<?php endif; ?>/> <?php echo $this->_var['lang']['hidden_outstock']; ?></label>
        </td>
      </tr>
      <?php endif; ?>

      <tr>
        <td colspan="4" align="center"><input type="hidden" name="action" value="form" />
          <input type="submit" name="Submit" value="<?php echo $this->_var['lang']['button_search']; ?>" class="bnt_number4" /></td>
      </tr>
    </table>
  </form>
    </div>
		<?php endif; ?>
		<?php if (isset ( $this->_var['goods_list'] )): ?>
		<div class="General_Title clearfix">
    <div class="TitleBoxcon">
		 <?php if ($this->_var['intromode'] == 'best'): ?>
		 <p><?php echo $this->_var['lang']['best_goods']; ?></p>
		 <?php elseif ($this->_var['intromode'] == 'new'): ?>
		 <p><?php echo $this->_var['lang']['new_goods']; ?></p>
		 <?php elseif ($this->_var['intromode'] == 'hot'): ?>
		 <p><?php echo $this->_var['lang']['hot_goods']; ?></p>
		 <?php elseif ($this->_var['intromode'] == 'promotion'): ?>
		 <p><?php echo $this->_var['lang']['promotion_goods']; ?></p>
		 <?php else: ?>
		 <p><?php echo $this->_var['lang']['search_result']; ?></p>
		 <?php endif; ?>
		  <?php if ($this->_var['goods_list']): ?>
			<form action="search.php" method="post" class="sort" name="listform" id="form">
					<select name="sort">
					<?php echo $this->html_options(array('options'=>$this->_var['lang']['sort'],'selected'=>$this->_var['pager']['search']['sort'])); ?>
					</select>
					<select name="order">
					<?php echo $this->html_options(array('options'=>$this->_var['lang']['order'],'selected'=>$this->_var['pager']['search']['order'])); ?>
					</select>
					<input type="image" name="imageField" src="themes/letphp/images/bnt_go.gif" style=" position:relative; top:3px;" alt="go"/>
					<input type="hidden" name="page" value="<?php echo $this->_var['pager']['page']; ?>" />
					<input type="hidden" name="display" value="<?php echo $this->_var['pager']['display']; ?>" id="display" />
					<?php $_from = $this->_var['pager']['search']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
              <?php if ($this->_var['key'] != "sort" && $this->_var['key'] != "order"): ?>
                <?php if ($this->_var['key'] == 'keywords'): ?>
                  <input type="hidden" name="<?php echo $this->_var['key']; ?>" value="<?php echo urldecode($this->_var['item']); ?>" />
                <?php else: ?>
                  <input type="hidden" name="<?php echo $this->_var['key']; ?>" value="<?php echo $this->_var['item']; ?>" />
                <?php endif; ?>
              <?php endif; ?>
         <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				</form>
			<?php endif; ?>
		</div>
    </div>
    <div class="clearfix groupList flowBox">
	  <?php if ($this->_var['goods_list']): ?>
		<form action="compare.php" method="post" name="compareForm" id="compareForm" onsubmit="return compareGoods(this);">

      <div class="clearfix goodsBox" style="border:none;">
                <?php $_from = $this->_var['goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
    foreach ($_from AS $this->_var['goods']):
?>
                <?php if ($this->_var['goods']['goods_id']): ?>
                 <div class="General_goodsBox">
                       <a href="<?php echo $this->_var['goods']['url']; ?>"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" alt="<?php echo $this->_var['goods']['goods_name']; ?>" /></a><br />
                       <p><a href="<?php echo $this->_var['goods']['url']; ?>" title="<?php echo htmlspecialchars($this->_var['goods']['name']); ?>"><?php echo $this->_var['goods']['goods_name']; ?></a></p>
                       <?php if ($this->_var['show_marketprice']): ?>
                        <?php echo $this->_var['lang']['market_prices']; ?> <font class="market_s"><?php echo $this->_var['goods']['market_price']; ?></font><br />
                        <?php endif; ?>
                        <?php if ($this->_var['goods']['promote_price'] != ""): ?>
                        <?php echo $this->_var['lang']['promote_price']; ?> <font class="price"><?php echo $this->_var['goods']['promote_price']; ?></font><br />
                        <?php else: ?>
                        <?php echo $this->_var['lang']['shop_prices']; ?> <font class="price"><?php echo $this->_var['goods']['shop_price']; ?></font><br />
                        <?php endif; ?>
                      <div class="action">
											<a href="javascript:collect(<?php echo $this->_var['goods']['goods_id']; ?>);"><?php echo $this->_var['lang']['btn_collect']; ?></a> |
                      <a href="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>)" ><?php echo $this->_var['lang']['btn_buy']; ?></a> |
                      <a href="javascript:;" id="compareLink" onClick="Compare.add(<?php echo $this->_var['goods']['goods_id']; ?>,'<?php echo addslashes($this->_var['goods']['goods_name']); ?>','<?php echo $this->_var['goods']['type']; ?>')"><?php echo $this->_var['lang']['compare']; ?></a></div>
                    </div>
                <?php endif; ?>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                </div>

    </form>
          <script type="text/javascript">
        <?php $_from = $this->_var['lang']['compare_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
        var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				
				<?php $_from = $this->_var['lang']['compare_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
        <?php if ($this->_var['key'] != 'button_compare'): ?>
        var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
        <?php else: ?>
        var button_compare = '';
        <?php endif; ?>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				
				
        var compare_no_goods = "<?php echo $this->_var['lang']['compare_no_goods']; ?>";
        window.onload = function()
        {
          Compare.init();
          fixpng();
        }
    var btn_buy = "<?php echo $this->_var['lang']['btn_buy']; ?>";
    var is_cancel = "<?php echo $this->_var['lang']['is_cancel']; ?>";
    var select_spe = "<?php echo $this->_var['lang']['select_spe']; ?>";
        </script>
		<?php else: ?>
		<div class="empty"><?php echo $this->_var['lang']['no_search_result']; ?></div>
    <?php endif; ?>
    </div>
		<?php echo $this->fetch('library/pages.lbi'); ?>
		<?php endif; ?>
		
	</div>

</div>
<?php echo $this->fetch('library/page_footer.lbi'); ?>
</body>
</html>
